/**
 * 
 */
package org.mspring.mlog.service.impl;

import java.util.List;

import org.mspring.mlog.dao.UserDao;
import org.mspring.mlog.entity.SysUser;
import org.mspring.mlog.entity.User;
import org.mspring.mlog.service.UserService;
import org.mspring.platform.core.AbstractServiceSupport;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;

/**
 * @author fairchildy
 * @since 2012-7-12
 * @Description
 * @TODO
 */
@Service
@Transactional
public class UserServiceImpl extends AbstractServiceSupport implements UserService {

	@Autowired
	private UserDao userDao;
    /*
     * (non-Javadoc)
     * 
     * @see org.mspring.mlog.service.UserService#login(java.lang.String,
     * java.lang.String)
     */
    @Override
    public SysUser login(String username, String password) {
        // TODO Auto-generated method stub
        // 密码加密
    	 SysUser user = userDao.login(username, password);
        return user;
    }

    /*
     * (non-Javadoc)
     * 
     * @see org.mspring.mlog.service.UserService#getUserByName(java.lang.String)
     */
    @Override
    public SysUser getUserByName(String username) {
   	 SysUser user = userDao.getUserByName(username);
        return user;
    }


	@Override
	public void updateUserInfo(SysUser user) {
		// TODO Auto-generated method stub
		
	}

	@Override
	public List<SysUser> getAllUser() {
		return userDao.getAllUser();
	}
	

}
